package com.gof.example.iterator;

import java.util.ArrayList;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Created by zhiyuan on 2018/5/10 22:52.
 * haiming.fei@tongdun.cn
 */
public abstract class AbstractList {

    protected List<Object> list = new ArrayList<Object>();

    public List<Object> getList() {
        return list;
    }

    public void add(Object a) {
        list.add(a);
    }

    public void remove(Object a) {
        list.remove(a);
    }

    abstract Iteratable iterator();
}
